package cn.jiangjiesheng.bootstrap.commons.utils;

import java.math.BigDecimal;

/**
 * Created by dev@jiangjiesheng.cn on 2021/10/31  <br/>
 *
 * @author dev@jiangjiesheng.cn
 */

public class MathRoundUtils {

    public static BigDecimal roundRate(Double input, int scale) {
        BigDecimal decimal = new BigDecimal(input);
        return decimal.setScale(scale, BigDecimal.ROUND_CEILING);
    }

}
